package cn.lds.health.utils;

import org.springframework.core.convert.converter.Converter;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * 自定义类型转换器
 */
public class DateTimeConverter implements Converter<String, LocalDateTime>{
    
    /**
     * 将字符串转换称为LocalDateTime类型
     * @param s
     * @return
     */
    @Override
    public LocalDateTime convert(String s) {
        return LocalDateTime.parse(s);
    }
}
